﻿//-----------------------------------------------------------------------
// <summary>
//  A module in Prism is a logical unit in your application.
// </summary>
// <copyright file="PropertyViewModelLocator.cs" company="DSSoftLogic">
//     Copyright@ DSSoftLogic 2011, Non-Commercial. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace Property.Silverlight.Module.ViewModelLocator
{
    using System.ComponentModel.Composition.Hosting;
    using Property.Silverlight.ViewModelEx;

    /// <summary>
    /// PropertyViewModelLocator class is used to locate viewmodel.
    /// </summary>
    public class PropertyViewModelLocator
    {
        /// <summary>
        /// Composition container field.
        /// </summary>
         private static CompositionContainer _container;

        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyViewModelLocator"/> class.
        /// </summary>
        public PropertyViewModelLocator()
        {
            ////
        }

        /// <summary>
        /// Gets the this property .
        /// </summary>
        /// <returns></returns>
        public object this[string viewModel]
        {
            get { return _container.GetExportedValue<object>(viewModel);
            }
        }

        /// <summary>
        /// Gets NewsArticleViewModel in View.
        /// </summary>
        public NewsArticleViewModel NewsArticleViewModel
        {
            get { return ; }
        }
    }
    }
}
